.cm-tag{
    position: relative;
    display: inline-flex;
    flex-direction: row;
    height: 20px;
    cursor: pointer;
    align-self: center;
    &.cm-tag-border {
        .cm-tag-content {
            border-style: solid;
            border-width: 1px;
            border-color: rgba(var(--cui-grey-6), 0.1);
        }
    }

    &.cm-tag-has-badge{
        &:hover{
            .cm-tag-badge {
                transform: translate(0, 0);
            }
        }
        .cm-tag-content{
            border-radius: var(--cui-border-radius-mini) 0 0 var(--cui-border-radius-mini);
            border-right: 0;
            &:hover{
                opacity: 1;
            }
        }
    }
    &.cm-tag-large {
        height: 24px;
        .cm-tag-content {
            padding: 4px 8px;
        }
        .cm-avatar {
            height: 24px;
            width: 24px;
        }
        .cm-tag-badge-text {
            padding: 0 6px;
        }
        &.cm-tag-has-avatar {
            .cm-tag-content {
                padding-left: 32px;
            }
        }
    }
    &.cm-tag-xlarge {
        height: 28px;
        .cm-tag-content {
            padding: 4px 8px;
            font-size: 14px;
        }
        .cm-avatar {
            height: 28px;
            width: 28px;
        }
        .cm-tag-badge-text {
            padding: 0 7px;
            font-size: 14px;
        }
        &.cm-tag-has-avatar {
            .cm-tag-content {
                padding-left: 36px;
            }
        }
    }
    &.cm-tag-primary{
        .cm-tag-content{
            color: #fff;
            background-color: var(--cui-primary-color);
            border-color: var(--cui-primary-color);
        }
    }

    &.cm-tag-success{
        .cm-tag-content{
            color: #fff;
            background-color: var(--cui-success-color);
            border-color: var(--cui-success-color);
        }
    }

    &.cm-tag-danger{
        .cm-tag-content{
            color: #fff;
            background-color: var(--cui-error-color);
            border-color: var(--cui-error-color);
        }
    }

    &.cm-tag-warning{
        .cm-tag-content{
            color: #fff;
            background-color: var(--cui-warning-color);
            border-color: var(--cui-warning-color);
        }
    }

    &.cm-tag-info{
        .cm-tag-content{
            color: #fff;
            background-color: var(--cui-info-color);
            border-color: var(--cui-info-color);
        }
    }
    &.cm-tag-magenta{
        .cm-tag-content{
            color: #eb2f96;
            background-color: #fff0f6;
            border-color: #ffadd2;
        }
    }
    &.cm-tag-red{
        .cm-tag-content{
            color: #f5222d;
            background-color: #fff1f0;
            border-color: #ffa39e;
        }
    }
    &.cm-tag-volcano{
        .cm-tag-content{
            color: #fa541c;
            background-color: #fff2e8;
            border-color: #ffbb96;
        }
    }
    &.cm-tag-orange{
        .cm-tag-content{
            color: #fa8c16;
            background-color: #fff7e6;
            border-color: #ffd591;
        }
    }
    &.cm-tag-gold{
        .cm-tag-content{
            color: #faad14;
            background-color: #fffbe6;
            border-color: #ffe58f;
        }
    }
    &.cm-tag-yellow{
        .cm-tag-content{
            color: #fadb14;
            background-color: #feffe6;
            border-color: #fffb8f;
        }
    }
    &.cm-tag-lime{
        .cm-tag-content{
            color: #a0d911;
            background-color: #fcffe6;
            border-color: #eaff8f;
        }
    }
    &.cm-tag-green{
        .cm-tag-content{
            color: #52c41a;
            background-color: #f6ffed;
            border-color: #b7eb8f;
        }
    }
    &.cm-tag-cyan{
        .cm-tag-content{
            color: #13c2c2;
            background-color: #e6fffb;
            border-color: #87e8de;
        }
    }
    &.cm-tag-blue{
        .cm-tag-content{
            color: #1890ff;
            background-color: #e6f7ff;
            border-color: #91d5ff;
        }
    }
    &.cm-tag-geekblue{
        .cm-tag-content{
            color: #2f54eb;
            background-color: #f0f5ff;
            border-color: #adc6ff;
        }
    }
    &.cm-tag-purple{
        .cm-tag-content{
            color: #722ed1;
            background-color: #f9f0ff;
            border-color: #d3adf7;
        }
    }

    &.cm-tag-circle{
        .cm-tag-content{
            border-radius: 26px;
        }
        .cm-avatar {
            border-radius: 12px;
        }
    }
    .cm-avatar {
        width: 20px;
        height: 20px;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        border-radius: var(--cui-border-radius-mini) 0 0 var(--cui-border-radius-mini);
        > * {
            line-height: 16px;
        }
    }
    &.cm-tag-has-avatar {
        .cm-tag-content {
            padding-left: 26px;
        }
    }
}
.cm-tag-content {
    color: rgba(var(--semi-grey-8),1);
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    list-style: none;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    position: relative;
    z-index: 1;
    padding: 2px 8px;
    border-radius: var(--cui-border-radius-mini);
    // border: 1px solid rgba(var(--cui-grey-6), 0.15);
    background: rgba(var(--cui-grey-5), 0.1);
    font-size: 12px;
    -webkit-transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
    transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
    opacity: 1;
    white-space: nowrap;
    &:hover{
        opacity: 0.8;
    }

    .cm-tag-close{
        color: rgba(var(--semi-grey-8),1);
        transition: all .3s;
        width: 12px;
        font-size: 12px;
        display: block;
        &:hover{
            color: rgba(var(--semi-grey-8),1);
        }
    }

    &.cm-tag-closing{
        transform: scaleX(0);
        transform-origin: 0 center;
    }
}
.cm-tag-text {
    display: flex;
    height: 0;
    align-items: center;
    line-height: 1px;
}
.cm-tag-badge{
    display: inline-flex;
    height: 100%;
    background: var(--cui-primary-color-hover);
    color: #fff;
    border-radius: 0 var(--cui-border-radius-mini) var(--cui-border-radius-mini) 0;
    transition: transform 0.25s linear;
    overflow: hidden;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    // transform: translate(-90%, 0);
    .cm-tag-badge-text{
        display: inline-block;
        padding: 0 4px;
        font-size: 12px;
    }
}
.cm-tag-group-more-wrap,
.cm-tag-group {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}
.cm-tag-more {
    span {
        display: inline-flex;
        align-self: end;
    }
    .cm-tag-content {
        border-color: transparent;
        background-color: transparent;
        padding: 2px;
    }
}